﻿using System.ComponentModel.DataAnnotations;

namespace Step4.Unit8.Modules
{
    public class UserEditViewModel
    {
       
        public string Id { get; set; }

        [Display(Name = "用户名")]
        [Required(ErrorMessage = "请输入用户名")]
        public string? UserName { get; set; }


        [Display(Name = "密码")]
        public string? Pwd { get; set; }

        [Display(Name = "邮箱")]
        [Required(ErrorMessage = "请输入邮箱")]
        [EmailAddress(ErrorMessage = "邮箱格式不正确")]
        public string? Email { get; set; }

        // 因为目前没有"多选下拉框"控件，所以就值存单个角色ID
        [Display(Name ="角色")]
        [Required(ErrorMessage ="请选择角色")]
        public string? RoleName { get; set; }
    }
}
